import React from 'react'
import { Layout, ConfigProvider  } from 'antd'
import SilderMenu from './silderMenu'
import Headers from './header/header'
import moment from 'moment'
import 'moment/locale/zh-cn'
import zhCN from 'antd/es/locale/zh_CN';

const { Header, Content } = Layout
moment.locale('zh-cn')

export default (props) => {
  return (
    <ConfigProvider
      locale={zhCN}
      getPopupContainer={node => node?node.parentElement:document.body}
    >
      <Layout style={{ height: '100%' }}>
        <SilderMenu/>
        <Layout className='body-right'>
          <Header className='header-box'>
            <Headers/>
          </Header>
          <Content className='content-box'>
            {props.children}
          </Content>
        </Layout>
      </Layout>
    </ConfigProvider>
  )
}
